import React, {Component, lazy} from 'react';
import {Switch, Redirect, Route} from 'react-router-dom';

const Index = lazy(() => import('../components/Order/Index'));
const Detail = lazy(() => import('../components/Order/Detail'));

class Order extends Component {
	render() {
		return (
			<div>
				<Switch>
					<Route path="/order/index" component={Index}/>
					<Route path="/order/detail/:orderNo" component={Detail}/>
					<Redirect from="/order" to="/order/index"/>
				</Switch>
			</div>
		);
	}
}

export default Order;